Skip to content

efi/preinstall: Fall back to checking the BootGuard status MSR in HAP mode#535

Merged
chrisccoulson merged 2 commits intocanonical:masterfrom
chrisccoulson:preinstall-support-btgstatus-msr-in-hap-mode
Apr 9, 2026
Merged

efi/preinstall: Fall back to checking the BootGuard status MSR in HAP mode#535
chrisccoulson merged 2 commits intocanonical:masterfrom
chrisccoulson:preinstall-support-btgstatus-msr-in-hap-mode

Conversation

@chrisccoulson
Copy link
Copy Markdown
Contributor

Access to the HFSTS registers via the HECI is not possible on systems
that use Intel's High Assurance Platform mode. This means that we can't
check the BootGuard policy. However, the startup ACM mirrors some
BootGuard policy settings to a MSR, so we can check this as a fallback
in this case.

There are some limitations here - it's not possible to check some bits
that indicate the platform has properly transitioned out of
manufacturing mode, and the error enforcement bits of the BootGuard
policy are not available either. However, there are no combinations of
the other policy bits that are duplicated with different error
enforcement bits for any of the recognized profiles, so this doesn't
matter.

Note that the reporter of this issue also noted that turning on HAP mode
resulted in an unexpected EV_EFI_ACTION event being measured to PCR7 on
their system. This doesn't fix that yet because I'm still waiting on a
response from the reporter.

… mode

Access to the HFSTS registers via the HECI is not possible on systems
that use Intel's High Assurance Platform mode. This means that we can't
check the BootGuard policy. However, the startup ACM mirrors some
BootGuard policy settings to a MSR, so we can check this as a fallback
in this case.

There are some limitations here - it's not possible to check some bits
that indicate the platform has properly transitioned out of
manufacturing mode, and the error enforcement bits of the BootGuard
policy are not available either. However, there are no combinations of
the other policy bits that are duplicated with different error
enforcement bits for any of the recognized profiles, so this doesn't
matter.

Note that the reporter of this issue also noted that turning on HAP mode
resulted in an unexpected EV_EFI_ACTION event being measured to PCR7 on
their system. This doesn't fix that yet because I'm still waiting on a
response from the reporter.
Comment thread efi/preinstall/intel_util.go Outdated
// -*- Mode: Go; indent-tabs-mode: t -*-

/*
* Copyright (C) 2024 Canonical Ltd
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2024?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll change that :)

// where these bits are reused with different error enforcement policies.
f := s&bootGuardFACB > 0
v := s&bootGuardVerifiedBoot > 0
m := s&bootGuardMeasuredBoot > 0
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose this measured boot has nothing to do with TPM, or does it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It implies that the ACM is the root of trust for measurement rather than the EFI firmware measuring itself.

@chrisccoulson chrisccoulson merged commit 7557d93 into canonical:master Apr 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants